package com.lyun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyun.pojo.User;
import com.lyun.vo.PersonalVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select id,header,nickname,gender,age,tags from tbl_user where gender!= #{gender} ORDER BY rand() limit 30")
    @Result(property = "avatar", column = "header")
    List<PersonalVo> selectRecommendPersonalListWithGender(String gender);

/*
    @Select("select id, header, nickname , gender,age,tags " +
            "from tbl_user " +
            "where age between #{age} - 5 and #{age} + 5 and gender != #{gender} and city = #{city} and education = #{education}")
    @Results(@Result())
    List<TodayBestVo> selectTodayBestVoWithPattrm(int age, String gender, String city, String education);
*/

}
